getaddrinfo-is-threadsafe
authorDebian OpenLDAP Maintainers <pkg-openldap-devel@lists.alioth.debian.org>
Thu, 25 Jul 2019 15:32:00 +0000 (16:32 +0100)
committerRyan Tandy <ryan@nardis.ca>
Thu, 25 Jul 2019 15:32:00 +0000 (16:32 +0100)
commit7d15727bcc62f3cc3914f47575e650ee24b093e2
tree821deb21cedc5374d7d948cb0c57c4a1b854bf0f
parentc8ce76ba15f816eae30dbff7f654452097e928a3
getaddrinfo-is-threadsafe

OpenLDAP upstream conservatively assumes that certain resolver functions
(getaddrinfo, getnameinfo, res_query, dn_expand) are not re-entrant; but we
know that the glibc implementations of these functions are thread-safe, so
we should bypass the use of this mutex.  This fixes a locking problem when
an application uses libldap and libnss-ldap is also used for hosts
resolution.

Closes Debian bug #340601.

Not suitable for forwarding upstream; might be made suitable by adding a
configure-time check for glibc and disabling the mutex only on known
thread-safe implementations.

Gbp-Pq: Name getaddrinfo-is-threadsafe
libraries/libldap/os-ip.c
libraries/libldap/util-int.c